package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 设备实体类
 */
@Data
@TableName("equipment")
public class Equipment {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("category")
    private String category;

    @TableField("name")
    private String name;

    @TableField("code")
    private String code;

    @TableField("serial_number")
    private String serialNumber;

    @TableField("specification")
    private String specification;

    @TableField("unit_price")
    private BigDecimal unitPrice;

    @TableField("quantity")
    private Integer quantity;

    @TableField("purchase_date")
    private LocalDate purchaseDate;

    @TableField("manufacturer")
    private String manufacturer;

    @TableField("brand")
    private String brand;

    @TableField("model")
    private String model;

    @TableField("supplier")
    private String supplier;

    @TableField("purchase_order")
    private String purchaseOrder;

    @TableField("invoice_number")
    private String invoiceNumber;

    @TableField("warranty_period")
    private Integer warrantyPeriod;

    @TableField("handler_name")
    private String handlerName;

    @TableField("laboratory_id")
    private Long laboratoryId;

    @TableField("status")
    private String status; // NORMAL-正常, BORROWED-借用中, REPAIRING-维修中, SCRAPPED-已报废

    @TableField("remark")
    private String remark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
